CREATE TABLE [agency].[Portal]
(
[PortalId] [int] NOT NULL IDENTITY(1, 1),
[PortalURL] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PortalValidity] [datetime] NOT NULL,
[TemplateId] [int] NOT NULL,
[CompanyId] [int] NOT NULL,
[Active] [bit] NOT NULL,
[Deleted] [bit] NOT NULL,
[CreatedBy] [int] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[ModifiedBy] [int] NULL,
[ModifiedOn] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [agency].[Portal] ADD CONSTRAINT [PK_Portal] PRIMARY KEY CLUSTERED  ([PortalId]) ON [PRIMARY]
GO
ALTER TABLE [agency].[Portal] ADD CONSTRAINT [FK_Portal_Company] FOREIGN KEY ([CompanyId]) REFERENCES [agency].[Company] ([CompanyId])
GO
